package cn.broadsense.biz.vo;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.io.Serializable;
import java.util.List;

/**
 * @author lijian
 * @description
 * @date 2024年09月12日 下午3:39
 */
@Data
public class ItemTagTemplateVo implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("模板名称")
    @Size(max = 64, message = "模板名称不能超过64个字符")
    @NotBlank(message = "模板名称不能为空")
    private String templateName;

    @ApiModelProperty("模板说明")
    @Size(max = 200, message = "模板说明不能超过200个字符")
    private String templateSpecification;

    @ApiModelProperty("标签集合")
    @NotEmpty(message = "填充标签不能为空")
    private List<ItemTagTemplateDetailVo> detailVoList;

    @Data
    public static class ItemTagTemplateDetailVo implements Serializable {

        private static final long serialVersionUID = 1L;

        @ApiModelProperty("模板ID")
        private Long itemTagTemplateId;

        @ApiModelProperty("标签ID")
        @NotNull(message = "标签不能为空")
        private Long id;

        @ApiModelProperty("标签名称")
        @NotBlank(message = "标签名称不能为空")
        private String fieldName;

        @ApiModelProperty("标签类型")
        @NotNull(message = "标签类型不能为空")
        private Integer tagType;

        @ApiModelProperty("是否必填")
        @NotNull(message = "是否必填不能为空")
        private Integer isRequired;
    }
}
